<extend name="Public/base"/>
<block name="body">
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
        window.UEDITOR_HOME_URL='__PUBLIC__/ueditor/';
        window.onload=function(){
            window.UEDITOR_CONFIG.imageUrl = '{:U('Editor')}';
            window.UEDITOR_CONFIG.imagePath = '__ROOT__/Uploads/Editor/';    
        }
</script>
<div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
            <h5>{$meta_title}</h5>
             <div class="buttons">
                 <a class="btn btn-mini"  href="javascript:history.go(-1);">返回</a>
             </div>
           </div>
          <div class="widget-content ">
                    <form class="form-horizontal" action="{:U('edit')}" method="post">
                                    <div class="control-group">
                                        <label class="control-label">分类</label>
                                        <div class="controls">
                                              <select name="pid">
                                                   <volist name="Think.config.NEWS_LIST_TYPE" id="newsType">
                                                   <option value="{$key}" <if condition="$info['pid'] eq $key">selected</if>>{$newsType}</option>
                                                   </volist>
                                              </select>       
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">名称</label>
                                        <div class="controls">
                                            <input type="text" name="title" value="{$info.title|default='无'}">
                                        </div>
                                    </div>
                                    <!--div class="control-group">
                                        <label class="control-label">语言</label>
                                        <div class="controls">
                                          <select name="lang">
                                            <option value="zh-cn" <if condition="$info['lang'] eq 'zh-cn'"> selected </if>>中文</option>
                                            <option value="en-us" <if condition="$info['lang'] eq 'en-us'"> selected </if>>英文</option>
                                          </select> 
                                        </div>
                                    </div-->
                                    <div class="control-group">
                                        <label class="control-label">内容</label>
                                        <div class="controls">
                                            <script type="text/javascript">
                                                  UE.getEditor('conter');
                                            </script>
                                            <textarea name="conter" id="conter" style="height:400px; width:80%;">{$info.conter|default=''}</textarea>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">是否开启</label>
                                        <div class="controls">
                                            <label><input type="radio" name="status" value="1" <if condition="$info['status'] eq 1"> checked="checked" </if> > 开启</label>
                                            <label><input type="radio" name="status" value="0" <if condition="$info['status'] eq 0"> checked="checked" </if> > 关闭</label>
                                        </div>
                                    </div>
                               <div class="form-actions">
                               <input type="hidden" name="id" value="{$info.id|default=''}">
                               <input type="hidden" name="userId" value="{$userId}">
                               <button class="btn btn-primary" type="submit">保存</button>
                           </div>
                     </form>
          </div>
        </div>
</block>
